function randomwalk( alpha )
% 

tend = 2.0;
N = 1600;
dt = tend / N; tseries = dt * (0:N);
phi1t = zeros(N+1,1) + 1.0i * zeros(N+1,1);
phi1t(1) = 0.001 + 0.0i;
phi2t = zeros(N+1,1) + 1.0i * zeros(N+1,1);
phi2t(1) = 1.0 + 0.0i;
E1 = 1.0;
E2 = 10.0;

for k = 2: (N+1)
	phi2t(k) = exp( -1.0i * E2 * tseries(k) );
	for l = 1 : (k-1)
		dBt = ( 2.0 * rand(1,1) - 1 ) * dt;
		phi1t(k) = phi1t(k) - 1.0i * alpha * exp( 1.0i * E1 * ...
			(tseries(l) - tseries(k)) ) * phi1t(l) * dBt;
		phi2t(k) = phi2t(k) - 1.0i * exp( 1.0i * E2 * ...
			(tseries(l) - tseries(k)) ) * phi2t(l) * dBt;
	end
end

rephi1t = real(phi1t);
imphi1t = imag(phi1t);
rephi2t = real(phi2t);
imphi2t = imag(phi2t);
absphi1t = abs(phi1t);
absphi2t = abs(phi2t);

clf
hold on
% plot(rephi1t, imphi1t);
% plot(rephi1t(1), imphi1t(1), 'kp', 'markersize', 20);
% plot(rephi1t(end), imphi1t(end), 'r.', 'markersize', 30);
plot( tseries, absphi1t ./ absphi2t );

hold off
